package com.wave.mapper;

import com.wave.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface UserMapper {

    int create(User user);

    int update(User user);

    int selectAccount(String account);
    int selectPhone(String phone);
    String selectPassword(@Param("account")String account, @Param("phone")String phone);
    String selectType(@Param("account")String account, @Param("phone")String phone);
    String selectAuth(String account);
    User selectAdmin(@Param("account")String account, @Param("phone")String phone);

    User queryDetail(String account);
    User userDetail(String account);

    String getPhone(String aId);
    String getUserName(String account);
    int getUserNum(@Param("userName")String userName, @Param("aid")String aid);
    int getTypeNum(int type);
    List<User> getUserList(@Param("pageStart")int pageStart, @Param("pageSize")int pageSize,
                           @Param("userName")String userName, @Param("aid")String aid);
    List<User> list();

    int bindAuth(@Param("account")String account, @Param("aId")String aId, @Param("phone")String phone);
}
